package org.darkforest.dao.mapper;

import org.darkforest.dao.annotation.DBMapper;
import org.darkforest.model.Article;

import java.util.List;

@DBMapper
public interface ArticleMapper {
    int deleteByPrimaryKey(Integer articleId);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Integer articleId);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);
    /**
     *  文章列表
     * @return
     */
    List<Article> selectAllArticle();
    /**
     * 高级查询文章列表
     * @return
     */
    List<Article> findArticleByCondition(Article article);
    /**
     * 查询文章的排序的最大值
     * @return
     */
    int selectNextSort();
}